#!/bin/bash

func() {
    echo data1 >$output1
    echo data2 >$output2
    echo data3 >$output3

}

output1=/tmp/output1
output2=/tmp/output2
output3=/tmp/output3

func
cat $output1
cat $output2
cat $output3
